package cn.com.dcsgo;

import cn.com.dcsgo.model.product.Category;
import cn.com.dcsgo.model.product.SkuInfo;
import cn.com.dcsgo.vo.product.SkuInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ProductFeignClient
 *
 * @author Dcsgo
 * @since 2025/4/17 上午11:48
 */
@FeignClient(value = "service-product")
public interface ProductFeignClient {
    @GetMapping("api/product/sku/vo/{skuId}")
    SkuInfoVo getSkuInfoVo(@PathVariable Long skuId);

    @GetMapping("api/product/category/{id}")
    Category getCategoryById(@PathVariable Long id);

    @GetMapping("api/product/sku/{id}")
    SkuInfo getSkuInfoById(@PathVariable Long id);

    @PostMapping("api/product/sku")
    List<SkuInfo> getSkuInfoByIds(@RequestBody List<Long> skuIds);

    @GetMapping("api/product/sku/new/user/count/{number}")
    List<SkuInfo> getSkuInfoByCountForNewUser(@PathVariable Integer number);

    @GetMapping("api/product/sku/name/{keyword}")
    List<SkuInfo> getSkuInfoByName(@PathVariable String keyword);

    @GetMapping("api/product/category")
    List<Category> getCategoryByIds(@RequestParam List<Long> ids);

    @GetMapping("api/product/categories")
    List<Category> getAllCategory();
}
